// import {
//   GET,
//   POST,
//   // DELETE,
//   // PATCH, 
//   PUT
// } from '@/utils/request.js'
// import { ALL } from './baseURL.js'
import { ALL } from './baseUrl'
import request from '@/utils/request'

// 获取煤种
// export const getCoalTypes = params => GET('/all/OData/CoalTypes' params).then(res => res.data)
export function getCoalTypes(params) {
  return request({
    url: '/all/OData/CoalTypes',
    method: 'get',
    params: params
  })
}
// 获取分区
// export const getBarPartitions = params => GET('/all/OData/BarPartitions' params).then(res => res.data)
export function getBarPartitions(params) {
  return request({
    url: '/all/OData/BarPartitions',
    method: 'get',
    params: params
  })
}
// export const getBarPartitions = params => GET('/all/api/services/app/BarPartitionService/Get' params).then(res => res.data);
// 获取煤场
// export const getBarSections = params => GET('/all/OData/BarSections' params).then(res => res.data)
export function getBarSections(params) {
  return request({
    url: '/all/OData/BarSections',
    method: 'get',
    params: params
  })
}
// 获取堆料机
// export const getBarWheelMachines = params => GET('/all/OData/BarWheelMachines' params).then(res => res.data)
export function getBarWheelMachines(params) {
  return request({
    url: '/all/OData/BarWheelMachines',
    method: 'get',
    params: params
  })
}
// 获取煤棚
// export const getBarYards = params => GET('/all/OData/BarYards' params).then(res => res.data)
export function getBarYards(params) {
  return request({
    url: '/all/OData/BarYards',
    method: 'get',
    params: params
  })
}
// 获取矿点
// export const getCoalSpots = params => GET('/all/OData/CoalSpots' params).then(res => res.data)
export function getCoalSpots(params) {
  return request({
    url: '/all/OData/CoalSpots',
    method: 'get',
    params: params
  })
}

// ------------  取料计划  ----------------------------------
// 获取取料计划
// export const searchTakePlan = params => POST('/all/api/services/app/TakePlanService/SearchTakePlan' params).then(res => res.data)
export function searchTakePlan(params) {
  return request({
    url: '/all/api/services/app/TakePlanService/SearchTakePlan',
    method: 'post',
    params: params
  })
}
// 添加取料计划
// export const addTakePlan = params => POST('/all/api/services/app/TakePlanService/Add' params).then(res => res.data)
export function addTakePlan(params) {
  return request({
    url: '/all/api/services/app/TakePlanService/Add',
    method: 'post',
    params: params
  })
}
// 审批取料计划
// export const reviewTakePlan = params => POST('/all/api/services/app/TakePlanService/CreateTaskPlan' params).then(res => res.data)
export function reviewTakePlan(params) {
  return request({
    url: '/all/api/services/app/TakePlanService/CreateTaskPlan',
    method: 'post',
    params: params
  })
}
// 撤回取料计划
// export const recallTakePlan = params => POST('/all/api/services/app/TakePlanService/Recall' params).then(res => res.data)
export function recallTakePlan(params) {
  return request({
    url: '/all/api/services/app/TakePlanService/Recall',
    method: 'post',
    params: params
  })
}
// 获取计划详情
// export const GetTakePlanInfo = params => POST('/all/api/services/app/TakePlanService/GetTakePlanInfo' params).then(res => res.data)
export function GetTakePlanInfo(params) {
  return request({
    url: '/all/api/services/app/TakePlanService/GetTakePlanInfo',
    method: 'post',
    params: params
  })
}

// ------------  取煤任务  ----------------------------------
// 获取正在执行的取煤任务
// export const getExecTingTake = params => GET('/all/api/services/app/TakeTaskService/GetExectingTask' params).then(res => res.data)
export function getExecTingTake(params) {
  return request({
    url: '/all/api/services/app/TakeTaskService/GetExectingTask',
    method: 'get',
    params: params
  })
}
// 获取取煤任务
// export const searchTakeTask = params => POST('/all/api/services/app/TakeTaskService/SearchTakeTask' params).then(res => res.data)
export function searchTakeTask(params) {
  return request({
    url: '/all/api/services/app/TakeTaskService/SearchTakeTask',
    method: 'post',
    params: params
  })
}
// 添加取煤任务
// export const addTakeTask = params => POST('/all/api/services/app/TakeTaskService/Add' params).then(res => res.data)
export function addTakeTask(params) {
  return request({
    url: '/all/api/services/app/TakeTaskService/Add',
    method: 'post',
    params: params
  })
}
// 发布取煤任务
// export const publishTakeTask = params => POST('/all/api/services/app/TakeTaskService/Publish' params).then(res => res.data)
export function publishTakeTask(params) {
  return request({
    url: '/all/api/services/app/TakeTaskService/Publish',
    method: 'post',
    params: params
  })
}
// 撤回取煤任务
// export const recallTakeTask = params => POST('/all/api/services/app/TakeTaskService/Recall' params).then(res => res.data)
export function recallTakeTask(params) {
  return request({
    url: '/all/api/services/app/TakeTaskService/Recall',
    method: 'post',
    params: params
  })
}
// 修改取料任务
// export const updateTakeTask = params => POST('/all/api/services/app/TakeTaskService/Update' params).then(res => res.data)
export function updateTakeTask(params) {
  return request({
    url: '/all/api/services/app/TakeTaskService/Update',
    method: 'post',
    params: params
  })
}

// ------------  堆料管理  ----------------------------------
// 获取正在执行的堆煤任务
// export const getExecTingStack = params => GET('/all/api/services/app/StackTaskService/GetExectingTask' params).then(res => res.data)
export function getExecTingStack(params) {
  return request({
    url: '/all/api/services/app/StackTaskService/GetExectingTask',
    method: 'get',
    params: params
  })
}
// 获取堆煤任务
// export const searchStackTask = params => POST('/all/api/services/app/StackTaskService/SearchStackTask' params).then(res => res.data)
export function searchStackTask(params) {
  return request({
    url: '/all/api/services/app/StackTaskService/SearchStackTask',
    method: 'post',
    params: params
  })
}
// 添加堆煤任务
// export const addStackTask = params => POST('/all/api/services/app/StackTaskService/Add' params).then(res => res.data)
export function addStackTask(params) {
  return request({
    url: '/all/api/services/app/StackTaskService/Add',
    method: 'post',
    params: params
  })
}
// 发布堆煤任务
// export const publishStackTask = params => POST('/all/api/services/app/StackTaskService/PublishToWheel' params).then(res => res.data)
export function publishStackTask(params) {
  return request({
    url: '/all/api/services/app/StackTaskService/PublishToWheel',
    method: 'post',
    params: params
  })
}
// 撤销堆煤任务
// export const recallStackTask = params => POST('/all/api/services/app/StackTaskService/Recall' params).then(res => res.data)
export function recallStackTask(params) {
  return request({
    url: '/all/api/services/app/StackTaskService/Recall',
    method: 'post',
    params: params
  })
}
// 修改堆煤任务
// export const updateStackTask = params => POST('/all/api/services/app/StackTaskService/Update' params).then(res => res.data)
export function updateStackTask(params) {
  return request({
    url: '/all/api/services/app/StackTaskService/Update',
    method: 'post',
    params: params
  })
}
// 绑定批次号
// export const bindBatchId = params => PUT('/all/api/services/app/StackTaskService/BindBatchId' params).then(res => res.data)
export function bindBatchId(params) {
  return request({
    url: '/all/api/services/app/StackTaskService/BindBatchId',
    method: 'put',
    params: params
  })
}

// ------------  倒搬计划  ----------------------------------
// 获取详细倒搬计划
// export const getMoveTaskInfo = params => POST('/all/api/services/app/MoveTaskService/GetMoveTaskInfo' params).then(res => res.data)
export function getMoveTaskInfo(params) {
  return request({
    url: '/all/api/services/app/MoveTaskService/GetMoveTaskInfo',
    method: 'post',
    params: params
  })
}
// 获取倒搬计划
// export const searchMoveTask = params => POST('/all/api/services/app/MoveTaskService/SearchMoveTask' params).then(res => res.data)
export function searchMoveTask(params) {
  return request({
    url: '/all/api/services/app/MoveTaskService/SearchMoveTask',
    method: 'post',
    params: params
  })
}
// 添加倒搬计划
// export const addMoveTask = params => POST('/all/api/services/app/MoveTaskService/Add' params).then(res => res.data)
export function addMoveTask(params) {
  return request({
    url: '/all/api/services/app/MoveTaskService/Add',
    method: 'post',
    params: params
  })
}
// 撤回倒搬计划
// export const recallMoveTask = params => POST('/all/api/services/app/MoveTaskService/Recall' params).then(res => res.data)
export function recallMoveTask(params) {
  return request({
    url: '/all/api/services/app/MoveTaskService/Recall',
    method: 'post',
    params: params
  })
}
// 审批倒搬计划
// export const reviewMoveTask = params => POST('/all/api/services/app/MoveTaskService/CreateTaskPlan' params).then(res => res.data)
export function reviewMoveTask(params) {
  return request({
    url: '/all/api/services/app/MoveTaskService/CreateTaskPlan',
    method: 'post',
    params: params
  })
}
// 修改倒搬计划
// export const updateMoveTask = params => POST('/all/api/services/app/MoveTaskService/Update' params).then(res => res.data)
export function updateMoveTask(params) {
  return request({
    url: '/all/api/services/app/MoveTaskService/Update',
    method: 'post',
    params: params
  })
}

// ------------  盘煤仪盘煤  ----------------------------------
// 获取盘煤仪盘煤记录
// export const GetInventoryHistory = params => POST('/all/api/services/app/InventoryService/SearchInventoryList' params).then(res => res.data)
export function GetInventoryHistory(params) {
  return request({
    url: '/all/api/services/app/InventoryService/SearchInventoryList',
    method: 'post',
    params: params
  })
}
// 获取正在执行的盘煤仪任务
// export const GetExecTingInventoryTask = params => GET('/all/api/services/app/InventoryTaskService/GetExectingTask' params).then(res => res.data)
export function GetExecTingInventoryTask(params) {
  return request({
    url: '/all/api/services/app/InventoryTaskService/GetExectingTask',
    method: 'post',
    params: params
  })
}
// 获取盘煤仪任务
// export const SearchInventoryTask = params => POST('/all/api/services/app/InventoryTaskService/SearchInventoryTask' params).then(res => res.data)
export function SearchInventoryTask(params) {
  return request({
    url: '/all/api/services/app/InventoryTaskService/SearchInventoryTask',
    method: 'post',
    params: params
  })
}
// 添加盘煤仪任务
// export const addInventoryTask = params => POST('/all/api/services/app/InventoryTaskService/Add' params).then(res => res.data)
export function addInventoryTask(params) {
  return request({
    url: '/all/api/services/app/InventoryTaskService/Add',
    method: 'post',
    params: params
  })
}
// 发布盘煤仪任务
// export const publishInventoryTask = params => POST('/all/api/services/app/InventoryTaskService/Publish' params).then(res => res.data)
export function publishInventoryTask(params) {
  return request({
    url: '/all/api/services/app/InventoryTaskService/Publish',
    method: 'post',
    params: params
  })
}
// 撤回盘煤仪任务
// export const recallInventoryTask = params => POST('/all/api/services/app/InventoryTaskService/Recall' params).then(res => res.data)
export function recallInventoryTask(params) {
  return request({
    url: '/all/api/services/app/InventoryTaskService/Recall',
    method: 'post',
    params: params
  })
}
// 终止盘煤仪任务
// export const stopInventoryTask = params => POST('/all/api/services/app/InventoryTaskService/Stop' params).then(res => res.data)
export function stopInventoryTask(params) {
  return request({
    url: '/all/api/services/app/InventoryTaskService/Stop',
    method: 'post',
    params: params
  })
}
// 修改盘煤仪任务
// export const updateInventoryTask = params => POST('/all/api/services/app/InventoryTaskService/Update' params).then(res => res.data)
export function updateInventoryTask(params) {
  return request({
    url: '/all/api/services/app/InventoryTaskService/Update',
    method: 'post',
    params: params
  })
}

// ------------  堆料机盘煤  ----------------------------------
// 获取堆料机盘煤记录
// export const GetMachineHistory = params => POST('/all/api/services/app/InventoryMachineService/SearchInventoryList' params).then(res => res.data)
export function GetMachineHistory(params) {
  return request({
    url: '/all/api/services/app/InventoryMachineService/SearchInventoryList',
    method: 'post',
    params: params
  })
}
// 获取正在执行的堆料机任务
// export const GetExecTingMachineTask = params => GET('/all/api/services/app/InventoryMachineTaskService/GetExectingTask' params).then(res => res.data)
export function GetExecTingMachineTask(params) {
  return request({
    url: '/all/api/services/app/InventoryMachineTaskService/GetExectingTask',
    method: 'get',
    params: params
  })
}
// 获取堆料机任务
// export const SearchMachineTask = params => POST('/all/api/services/app/InventoryMachineTaskService/SearchInventoryTask' params).then(res => res.data)
export function SearchMachineTask(params) {
  return request({
    url: '/all/api/services/app/InventoryMachineTaskService/SearchInventoryTask',
    method: 'post',
    params: params
  })
}
// 添加堆料机任务
// export const addMachineTask = params => POST('/all/api/services/app/InventoryMachineTaskService/Add' params).then(res => res.data)
export function addMachineTask(params) {
  return request({
    url: '/all/api/services/app/InventoryMachineTaskService/Add',
    method: 'post',
    params: params
  })
}
// 发布堆料机任务
// export const publishMachineTask = params => POST('/all/api/services/app/InventoryMachineTaskService/Publish' params).then(res => res.data)
export function publishMachineTask(params) {
  return request({
    url: '/all/api/services/app/InventoryMachineTaskService/Publish',
    method: 'post',
    params: params
  })
}
// 撤回堆料机任务
// export const recallMachineTask = params => POST('/all/api/services/app/InventoryMachineTaskService/Recall' params).then(res => res.data)
export function recallMachineTask(params) {
  return request({
    url: '/all/api/services/app/InventoryMachineTaskService/Recall',
    method: 'post',
    params: params
  })
}
// 修改堆料机任务
// export const updateMachineTask = params => POST('/all/api/services/app/InventoryMachineTaskService/Update' params).then(res => res.data)
export function updateMachineTask(params) {
  return request({
    url: '/all/api/services/app/InventoryMachineTaskService/Update',
    method: 'post',
    params: params
  })
}

// ------------